package com.example.pingze.service;

import com.example.pingze.entity.CommentUserLike;
import com.example.pingze.repository.CommentUserLikeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommentUserLikeService {
    @Autowired
    private CommentUserLikeRepository repository;

    public void saveCommentUserLike(CommentUserLike commentUserLike) {
        repository.save(commentUserLike);
    }

    public void delete(CommentUserLike commentUserLike) {
        repository.delete(commentUserLike);
    }

    public CommentUserLike findCommentUserLikeByAccountAndCommentId(String account, String commentId) {
        return repository.findCommentUserLikeByAccountAndCommentId(account,commentId);
    }
}
